API Reference

Latest update: September 2018

WLAN APIs

Command ID Command name Description
0x0001 iSDIO_WLAN_Scan Search for connectable wireless LAN.
0x0002 iSDIO_WLAN_Connect Wireless LAN connection as a station.
0x0003 iSDIO_WLAN_Establish Establishment of wireless LAN connection as access point.
0x0005 iSDIO_WLAN_StartWPS Start of wireless LAN connection setup by WPS as station.
0x0007 iSDIO_WLAN_Disconnect Disconnect the wireless LAN.

Common APIs

Command ID Command name Description
0x0011 iSDIO_WLAN_SetCurrentTime Set the date and time of FlashAir.
0x0015 iSDIO_WLAN_SetChannel Set the channel number of the access point.

Server Upload APIs

Command name Description
iSDIO_WLAN_Request Sending each HTTP message.

Original APIs

Command ID Command name Description
0xE200 iSDIO_WLAN_Bridge Start bridge mode.
0xE201 iSDIO_WLAN_BridgeGetByRegister Get bridge mode information.

Other APIs

Command name Description
iSDIO_WLAN_GetSSIDs Get the number of access points.
iSDIO_WLAN_GetSSID Get the access point name.
iSDIO_WLAN_GetStatusData Obtain output data of Status Register.
iSDIO_WLAN_GetResponseData Response Data Register Port output data is obtained.
iSDIO_WLAN_GetVersion Get version information.
iSDIO_WLAN_SetWaitResponseTime Response Changes the wait timeout value.
iSDIO_WLAN_Check_WLANConnect Check the WLAN connection.
iSDIO_WLAN_Check_WLAN Check the WLAN On / Off status.
iSDIO_WLAN_Get_WLAN_Status Get "WLAN" data of Status Register.

Shared memory

Command name Description
iSDIO_WLAN_ReadSharedMemory Load Shared Memory.
iSDIO_WLAN_WriteSharedMemory Write to Shared Memory.
iSDIO_WLAN_GetFlashAirVersion Confirm the version and capacity of FlashAir from CID.

iSDIO_WLAN_Scan

Search for connectable wireless LAN. It is necessary to acquire the response by searching the result.

Format

int32_t iSDIO_WLAN_Scan(
        iSDIO_INFO_t                *info,
        uint32_t                    seq_id
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] seq_id
iSDIO command sequence ID

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

Command ID

0x0001

iSDIO_WLAN_Connect

Connect the wireless LAN with the SSID and network key of the access point specified as a station.

Format

int32_t iSDIO_WLAN_Connect(
        iSDIO_INFO_t                *info,
        uint32_t                    seq_id,
        uint8_t                     *ssid,
        uint16_t                    ssid_size,
        uint8_t                     *ntwk_key,
        uint32_t                    ntwk_key_size
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] seq_id
iSDIO command sequence ID
[in] *ssid
SSID of connection destination access point (maximum 32 bytes)
[in] ssid_size
Number of bytes of the SSID of the connected access point
[in] *ntwk_key
Network key (maximum 64 bytes)
[in] ntwk_key_size
Number of bytes of network key (no encryption in case of 0)

Return value

E_iSDIO_OK
Successful completion
E_iSDIO_INVALID_PARAM
Illegal parameters
E_iSDIO_CMD_BUF_OVERFLOW
Command buffer shortage
E_iSDIO_TIMEOUT
Timeout occurrence
E_iSDIO_DEVICE_ERROR
Device error
E_iSDIO_UNKNOWN_ERROR
Unknown error

Command ID

0x0002

iSDIO_WLAN_Establish

Establish wireless LAN connection with SSID and network key of access point designated as access point.

Format

int32_t iSDIO_WLAN_Establish(
        iSDIO_INFO_t                *info,
        uint32_t                    seq_id,
        uint8_t                     *ssid,
        uint16_t                    ssid_size,
        uint8_t                     *ntwk_key,
        uint32_t                    ntwk_key_size,
        iSDIO_WLAN_EcnMode_t        encMode
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] seq_id
iSDIO command sequence ID
[in] *ssid
SSID of connection destination access point (maximum 32 bytes)
[in] ssid_size
Number of bytes of the SSID of the connected access point
[in] *ntwk_key
Network key (maximum 64 bytes)
[in] ntwk_key_size
Number of bytes of network key (no encryption in case of 0)
[in] encMod
Encryption mode
iSDIO_WLAN_ENCMODE_NO_ENCRYPTION = 0x00
No encryption
iSDIO_WLAN_ENCMODE_OPEN_SYSTEM_AND_WEP = 0x01
Open System and WEP
iSDIO_WLAN_ENCMODE_SHARED_KEY_AND_WEP = 0x02
Shared Key and WEP
iSDIO_WLAN_ENCMODE_WPA_PSK_AND_TKIP = 0x03
WPA-PSK and TKIP
iSDIO_WLAN_ENCMODE_WPA_PSK_AND_AES = 0x04
WPA-PSK and AES
iSDIO_WLAN_ENCMODE_WPA2_PSK_AND_TKIP = 0x05
WPA2-PSK and TKIP
iSDIO_WLAN_ENCMODE_WPA2_PSK_AND_AES = 0x06
WPA2-PSK and AES

Return value

E_iSDIO_OK
Successful completion
E_iSDIO_INVALID_PARAM
Illegal parameters
E_iSDIO_CMD_BUF_OVERFLOW
Command buffer shortage
E_iSDIO_TIMEOUT
Timeout occurrence
E_iSDIO_DEVICE_ERROR
Device error
E_iSDIO_UNKNOWN_ERROR
Unknown error

Command ID

0x0003

iSDIO_WLAN_StartWPS

As a station, start wireless LAN connection setup by WPS.

Format

int32_t iSDIO_WLAN_StartWPS(
        iSDIO_INFO_t                *info,
        uint32_t                    seq_id,
        uint8_t                     *ssid,
        uint16_t                    ssid_size,
        iSDIO_WLAN_WPSMode_t        wpsMode,
        uint8_t                     *pin,
        uint32_t                    pin_size
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] seq_id
iSDIO command sequence ID
[in] *ssid
SSID of connection destination access point (maximum 32 bytes)
[in] ssid_size
Number of bytes of the SSID of the connected access point
[in] wpsMode
WPS mode
iSDIO_WLAN_WPSMODE_WITH_PIN = 0x01
WPS with PIN
iSDIO_WLAN_WPSMODE_WITH_PBC = 0x02
WPS with PBX
[in] *pin
PIN code (maximum byte)
[in] pin_size
Number of bytes in PIN code

Return value

E_iSDIO_OK
Successful completion
E_iSDIO_INVALID_PARAM
Illegal parameters
E_iSDIO_CMD_BUF_OVERFLOW
Command buffer shortage
E_iSDIO_TIMEOUT
Timeout occurrence
E_iSDIO_DEVICE_ERROR
Device error
E_iSDIO_UNKNOWN_ERROR
Unknown error

Command ID

0x0005

important point

When specifying iSDIO_WLAN_WPSMODE_WITH_PBC with wpsMode, specify NULL for ssid, pin, 0 for ssid_size and pin_size.

iSDIO_WLAN_Disconnect

Disconnect the wireless LAN.

Format

int32_t iSDIO_WLAN_Disconnect(
        iSDIO_INFO_t                *info,
        uint32_t                    seq_id
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] seq_id
iSDIO command sequence ID

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

Command ID

0x0007

iSDIO_WLAN_SetCurrentTime

Set the date and time of FlashAir.

Format

int32_t iSDIO_WLAN_SetCurrentTime(
        iSDIO_INFO_t                *info,
        uint32_t                    seq_id,
        iSDIO_WLAN_Date_t           currentDate,
        iSDIO_WLAN_Time_t           currentTime
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] seq_id
iSDIO command sequence ID
[in] currentDate
date
typedef struct iSDIO_WLAN_Date_s {
  uint16_t day:5;   //!< day
  uint16_t month:4; //!< month
  uint16_t year:7;  //!< year (elapsed year since 1980)
} iSDIO_WLAN_Date_t;
[in] currentTime

time

typedef struct iSDIO_WLAN_Time_s {
  uint16_t second:5;  //!< second
  uint16_t minute:6;  //!< minute
  uint16_t hour:5;    //!< hour
} iSDIO_WLAN_Time_t;

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

Command ID

0x0011

iSDIO_WLAN_SetChannel

Set the access point's channel number. If FlashAir does not support some channels, this command will be rejected.
You need to check Capability Register "Channel Support".
See iSDIO Capability Register for Wireless LAN.

Format

int32_t iSDIO_WLAN_SetChannel(
        iSDIO_INFO_t                *info,
        uint32_t                    seq_id,
        uint8_t                     ch
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] seq_id
iSDIO command sequence ID
[in] ch
Channel number
0x00
Automatic
0x01
Channel 1

...

0x0E
Channel 14
0x24
Channel 36

...

0xA1
Channel 161

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

Command ID

0x0015

iSDIO_WLAN_Request

Each HTTP message is transmitted according to the specified parameters.

Format

int32_t iSDIO_WLAN_Request(
        iSDIO_INFO_t                *info,
        uint32_t                    seq_id,
        iSDIO_WLAN_httpType_t       host_type,
        uint8_t                     *hostname,
        uint32_t                    hostname_size,
        iSDIO_WLAN_MessageType_t    msg_type,
        uint8_t                     *message,
        uint32_t                    message_size,
        uint8_t                     *apnd_filename,
        uint32_t                    apnd_filename_size,
        iSDIO_WLAN_HeaderRemoval_t  headerRemoval
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] seq_id
iSDIO command sequence ID
[in] host_type
Host Type
HTTP communication
iSDIO_WLAN_HTTP(0x00)
HTTPS communication
iSDIO_WLAN_HTTPSSL
[in] *hostname
hostname
When host_type is HTTP communication, it means the host name to which HTTP response message is sent and HTTP response message is received.
The port number is 80, unless a proxy server is used.
When host_type is HTTPS communication, it is the same as HTTP communication, except that it requests an HTTP message via SSL.
The port number is 443, unless a proxy server is used.
[in] hostname_size
Byte number of host name
[in] msg_type
Message type
Read from register
iSDIO_WLAN_MSG_REGISTER(0x00)
Read from file
iSDIO_WLAN_MSG_FILE(0x01)
[in] *message
Message (file name)
It means an HTTP request message consisting of an HTTP request line, an HTTP message header, and an HTTP message body.
Since the storage destination of the message is obtained from the register or file, specify the storage location with msg_type.
In the case of register specification, specify the storage destination address, and in case of file specification, specify the file storage destination path and file name.
[in] message_size
Number of bytes of message (file name)
[in] *apnd_filename
Attachment name
[in] apnd_filename_size
Number of bytes of the attached file name
[in] headerRemoval
Header additional information
With HTTP header
iSDIO_WLAN_WITH_HEADER(0x00)
No HTTP header
iSDIO_WLAN_ONLY_BODY(0x01)

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

Remarks

Each HTTP message is transmitted according to the specified parameters. Only the following combinations are valid for parameters.

Send HTTP message read from register

(For processing details see iSDIO_WLAN_SendHTTPMessageByRegister)

host_type iSDIO_WLAN_HTTP
*hostname Start address of the buffer in which the host name is stored
hostname_size Data length of host name
msg_type iSDIO_WLAN_MSG_REGISTER
*message Start address of buffer in which message is stored
message_size Message data length
*apnd_filename NULL
apnd_filename_size 0
headerRemoval No setting required

Send HTTP message read from register with file

(For processing details see iSDIO_WLAN_SendHTTPFileByRegister)

host_type iSDIO_WLAN_HTTP
*hostname Start address of the buffer in which the host name is stored
hostname_size Data length of host name
msg_type iSDIO_WLAN_MSG_REGISTER
*message Start address of buffer in which message is stored
message_size Message data length
*apnd_filename Path of file to send to server
apnd_filename_size Data length of apnd_filename
headerRemoval No setting required

Sending an HTTP message read from the register with SSL

(For processing details see iSDIO_WLAN_SendHTTPSSLMessageByRegister)

host_type iSDIO_WLAN_HTTPSSL
*hostname Start address of the buffer in which the host name is stored
hostname_size Data length of host name
msg_type iSDIO_WLAN_MSG_REGISTER
*message Start address of buffer in which message is stored
message_size Message data length
*apnd_filename NULL
apnd_filename_size 0
headerRemoval No setting required

Sending an HTTP message read from register with file with SSL

(For processing details see iSDIO_WLAN_SendHTTPSSLFileByRegister)

host_type iSDIO_WLAN_HTTPSSL
*hostname Start address of the buffer in which the host name is stored
hostname_size Data length of host name
msg_type iSDIO_WLAN_MSG_REGISTER
*message Start address of buffer in which message is stored
message_size Message data length
*apnd_filename Path of file to send to server
apnd_filename_size Data length of apnd_filename
headerRemoval No setting required

Send HTTP message read from file

(For processing details see iSDIO_WLAN_SendHTTPMessageByFile)

host_type iSDIO_WLAN_HTTP
*hostname Start address of the buffer in which the host name is stored
hostname_size Data length of host name
msg_type iSDIO_WLAN_MSG_FILE
*message Path of outgoing message file
message_size Data length of path
*apnd_filename NULL
apnd_filename_size 0
headerRemoval iSDIO_WLAN_WITH_HEADER or iSDIO_WLAN_ONLY_BODY

Send an HTTP message read from a file with a file

(For processing details see iSDIO_WLAN_SendHTTPFileByFile)

host_type iSDIO_WLAN_HTTP
*hostname Start address of the buffer in which the host name is stored
hostname_size Data length of host name
msg_type iSDIO_WLAN_MSG_FILE
*message Path of outgoing message file
message_size Data length of path
*apnd_filename Path of file to send to server
apnd_filename_size Data length of apnd_filename
headerRemoval iSDIO_WLAN_WITH_HEADER or iSDIO_WLAN_ONLY_BODY

Sending an HTTP message read from a file with SSL

(For processing details see iSDIO_WLAN_SendHTTPSSLMessageByFile)

host_type iSDIO_WLAN_HTTPSSL
*hostname Start address of the buffer in which the host name is stored
hostname_size Data length of host name
msg_type iSDIO_WLAN_MSG_FILE
*message Start address of buffer in which message is stored
message_size Data length of path
*apnd_filename NULL
apnd_filename_size 0
headerRemoval iSDIO_WLAN_WITH_HEADER or iSDIO_WLAN_ONLY_BODY

Sending with HTTP with HTTP message read from file with SSL

(For processing details see iSDIO_WLAN_SendHTTPSSLFileByFile)

host_type iSDIO_WLAN_HTTPSSL
*hostname Start address of the buffer in which the host name is stored
hostname_size Data length of host name
msg_type iSDIO_WLAN_MSG_FILE
*message Start address of buffer in which message is stored
message_size Data length of path
*apnd_filename Path of file to send to server
apnd_filename_size Data length of apnd_filename
headerRemoval iSDIO_WLAN_WITH_HEADER or iSDIO_WLAN_ONLY_BODY

Notes

In the case of SSL, it is recommended to set root authentication with iSDIO_WLAN_SetCertificate or iSDIO_WLAN_SetCertificateByFile before executing this API.
If you execute this API without setting root authentication, FlashAir executes the command without authenticating the server certificate by root authentication.

iSDIO_WLAN_Bridge

Start bridge mode.
Connect to the STA specified by brgssid, and then start the AP using apssid.

Format

int32_t iSDIO_WLAN_Bridge(
        iSDIO_INFO_t                *info,
        uint32_t                    seq_id,
        uint8_t                     *apssid,
        uint8_t                     *apnetworkKey,
        iSDIO_WLAN_EcnMode_t        encMode,
        uint8_t                     *brgssid,
        uint8_t                     *brgnetworkKey
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] seq_id
iSDIO command sequence ID
[in] *apssid
SSID for connecting from AirNet (maximum 32 bytes)
[in] *apnetworkKey
Network key for connecting from AirNet (maximum 64 bytes)
[in] encMode
Cipher mode
In bridge mode, the setting values are as follows.
  • iSDIO_WLAN_ENCMODE_WPA_PSK_AND_TKIP(0x03)
  • iSDIO_WLAN_ENCMODE_WPA2_PSK_AND_AES(0x06)
[in] *brgssid
SSID for connecting to TopNet (maximum 32 bytes)
[in] *brgnetworkKey
Network key for connecting to TopNet (maximum 64 bytes)

Return value

E_iSDIO_OK
Successful completion
E_iSDIO_INVALID_PARAM
Illegal parameters
E_iSDIO_CMD_BUF_OVERFLOW
Command buffer shortage
E_iSDIO_TIMEOUT
Timeout occurrence
E_iSDIO_DEVICE_ERROR
Device error
E_iSDIO_UNKNOWN_ERROR
Unknown error

Command ID

0xE200

Notes

Bridge can not be executed unless it is in disconnected state.
If FlashAir is connected to another device, first execute iSDIO_WLAN_Disconnect.
Please execute after 6 seconds to execute Bridge again after disconnecting.

iSDIO_WLAN_BridgeGetByRegister

Get bridge mode information. The acquired bridge mode information is set in the output data of Response Data Register Port.

Format

int32_t iSDIO_WLAN_BridgeGetByRegister(
        iSDIO_INFO_t                *info,
        uint32_t                    seq_id
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] seq_id
iSDIO command sequence ID

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

Command ID

0xE201

Remarks

The structure of the bridge mode information is as follows.

typedef struct iSDIO_WLAN_BridgeListItem_s {
        uint32_t    status;
        uint8_t     appssid[32+4];
        uint8_t     appnetworkKey[64+4];
        uint8_t     ipaddr[4];
        uint8_t     subnetMask[4];
        uint8_t     defGateWay[4];
        uint8_t     prefDnsServer[4];
        uint8_t     altDnsServer[4];
        uint8_t     brgssid[32+4];
        uint8_t     brgnetworkKey[64+4];
        uint8_t     brgIpaddr[4];
        uint8_t     brgsunetMask[4];
        uint8_t     brgdefGateWay[4];
        uint8_t     brgprefDnsServer[4];
        uint8_t     brgaltDnsServer[4];
} iSDIO_WLAN_BridgeListItem_t;

Notes

This API is for outputting bridge mode information to Response Data Register Port.
In order to actually obtain bridge mode information, it is necessary to read Response Data Register Port.

iSDIO_WLAN_GetSSIDs

Get the number of access points scanned.

Format

int32_t iSDIO_WLAN_GetSSIDs(
        iSDIO_INFO_t                *info,
        uint8_t                     *num
)

Argument

[in] *info
Pointer to iSDIO card control information
[out] *num
Number of access points
The number of access points when iSDIO_WLAN_Scan is executed is acquired.

Return value

E_iSDIO_OK
Successful completion

Notes

It must be executed after acquiring the response of iSDIO_WLAN_Scan.
The number of access points can not be acquired correctly even if it is executed in other conditions.

iSDIO_WLAN_GetSSID

Acquire the access point name corresponding to the scanned specified number.

Format

int32_t iSDIO_WLAN_GetSSID(
        iSDIO_INFO_t                *info,
        uint8_t                     number,
        uint8_t                     *ssid
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] number
Designated number (valid range is 0 to (Max - 1))
If the specified number is exceeded, the return value is Illegal parameters.
[out] *ssid
Start address of the buffer that stores the access point name
Since the SSID is a maximum of 32 bytes, prepare a buffer of at least 32 bytes.
The access point name with the specified number when iSDIO_WLAN_Scan is executed is acquired.

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

Notes

It must be executed after acquiring the response of iSDIO_WLAN_Scan.
The number of access points can not be acquired correctly even if it is executed in other conditions.

iSDIO_WLAN_GetStatusData

Obtain output data of Status Register. The current Status Register information is stored at the address specified by Argumentgetbuf.

Format

int32_t iSDIO_WLAN_GetStatusData(
        iSDIO_INFO_t                *info,
        uint8_t                     *getbuf
)

Argument

[in] *info
Pointer to iSDIO card control information
[out] *getbuf
Acquisition buffer pointer
A 512-byte buffer is required to store the output data of Status Register.

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

iSDIO_WLAN_GetResponseData

Response Data Register Port output data is obtained. The information of the current Response Data Register Port is stored at the address specified by Argumentgetbuf.

Format

int32_t iSDIO_WLAN_GetResponseData(
        iSDIO_INFO_t                *info,
        uint8_t                     *getbuf
)

Argument

[in] *info
Pointer to iSDIO card control information
[out] *getbuf
Acquisition buffer pointer
A 512-byte buffer is required to store the output data of Response Data Register Port.

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

iSDIO_WLAN_GetVersion

Read the version information (0x005f0 - 0x005ff) stored in the Status Register.

Format

int32_t iSDIO_WLAN_GetVersion(
        iSDIO_INFO_t                *info,
        uint8_t                     *getbuf
)

Argument

[in] *info
Pointer to iSDIO card control information
[out] *getbuf
Acquisition buffer pointer
A 16-byte buffer is required to store the version information.

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

iSDIO_WLAN_SetWaitResponseTime

Response Changes the wait timeout value. Set the timeout value in ms.

Format

void iSDIO_WLAN_SetWaitResponseTime(
        uint32_t                     time
)

Argument

[in] time
Response wait timeout value (ms)

Return value

None

iSDIO_WLAN_Check_WLANConnect

Check the WLAN connection. The connection status is judged by Connected of 0506h (bit 7) of Status Register.

Format

int32_t iSDIO_WLAN_Check_WLANConnect(
        iSDIO_INFO_t                *info,
        iSDIO_WLAN_Connect_t        *connect
)

Argument

[in] *info
Pointer to iSDIO card control information
[out] connect
Connection Status
WLAN connection state
iSDIO_WLAN_CONNECTED(0x01)
WLAN unconnected state
iSDIO_WLAN_NO_CONNECTION(0x00)

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

iSDIO_WLAN_Check_WLAN

Check the WLAN On / Off status. The connection status is determined by Infra-Direct 0506h (bit 6-5) of Status Register.
※00:OFF、01/10:ON

Format

int32_t iSDIO_WLAN_Check_WLAN(
        iSDIO_INFO_t                *info,
        iSDIO_WLAN_OnOFF_t          *onoff
)

Argument

[in] *info
Pointer to iSDIO card control information
[out] *onoff
Wireless LAN operation state
WLAN On
iSDIO_WLAN_ON(0x01)
WLAN OFF
iSDIO_WLAN_OFF(0x00)

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

iSDIO_WLAN_Get_WLAN_Status

Get "WLAN" data of Status Register. Get 0506h of Status Register for WLAN information.

Format

int32_t iSDIO_WLAN_Get_WLAN_Status(
        iSDIO_INFO_t                *info,
        uint8_t                     *param
)

Argument

[in] *info
Pointer to iSDIO card control information
[out] *param
WLAN data
A 1-byte buffer is required to store WLAN information of Status Register.

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

iSDIO_WLAN_ReadSharedMemory

It reads data from Shared Memory.

Format

int32_t iSDIO_WLAN_ReadSharedMemory(
        iSDIO_INFO_t                *info,
        uint32_t                    addr,
        uint32_t                    len,
        uint8_t                     buf
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] addr
Read address (0 to 2047)
[in] len
Data length (1 to 2048) byte
[out] buf
Read data

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

iSDIO_WLAN_WriteSharedMemory

Write data to Shared Memory.

Format

int32_t iSDIO_WLAN_WriteSharedMemory(
        iSDIO_INFO_t                *info,
        uint32_t                    addr,
        uint32_t                    len,
        uint8_t                     buf
)

Argument

[in] *info
Pointer to iSDIO card control information
[in] addr
Write address (0 to 2047)
[in] len
Data length (1 to 2048) byte
[in] buf
Write data

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

iSDIO_WLAN_GetFlashAirVersion

Confirm the version and capacity of FlashAir from CID.

Format

int32_t iSDIO_WLAN_GetFlashAirVersion(
        iSDIO_INFO_t                *info,
        uint8_t                     cardver,
        uint16_t                    cardsize
)

Argument

[in] *info
Pointer to iSDIO card control information
[out] cardver
Card version
[out] cardsize
Card capacity

Return value

E_iSDIO_OK
Successful completion
Other
Error occurred

Remarks

The relationship between cardver, cardsize and version and capacity of FlashAir is as follows.

cardver cardsize Version and capacity
2 8 FlashAir W02 8G
2 16 FlashAir W02 16G
2 32 FlashAir W02 32G
3 8 FlashAir W03 8G
3 16 FlashAir W03 16G
3 32 FlashAir W03 32G
4 16 FlashAir W04 16G
4 32 FlashAir W04 32G
4 64 FlashAir W04 64G
255 Other than 0 Flash version of cardsize in version unknown
255 0 Version, FlashAir of unknown capacity
0 0 Not FlashAir

Caution

This function is available when the SD card slot is 1 slot system file and the device file is located in / dev / mmcblk 0.